<div class="confirm_model" style="display:none" title="<?php echo $title?>">
	<div class="alert_info_content"><?php echo $message?></div>
	<div class="alert_box_btn">
		<div class="left"><a id="ok" href="javascript:void(0);">确定</a></div>
		<div class="right"><a id="cancel" href="javascript:void(0);">取消</a></div>
		<div class="clear"></div>
	</div>
</div>
<script>
$(function() {
	$( ".confirm_model" ).dialog({
		autoOpen: false,
		height: 150,
		width: 300,
		modal:true,
		resizable: false
	});
	$("#cancel").click(function() {
		$(".confirm_model").dialog( "close" );
	});
});
function delfile(obj,fileid,key) {
		$(".confirm_model").dialog( "open" );
		$("#ok").click(function() {
			delfiles(obj,fileid,key)
			$(".confirm_model").dialog( "close" );
		});
}
function delfiles(obj,fileid,key) {
	var webpath=$("#getpath").attr('href');
	$(obj).parent().parent().remove();
	var filelist=$("#filelist"+key).text();
	var urlpath=webpath+'projects/delfile/'+fileid;
	$.ajax({     	   
	        url: urlpath, 
	        success:function(data){
	        	showmessage("文件删除成功");
	        	if(filelist.trim()==""){
	        		$("#filelist"+key).html('<ul class="file_attach">暂无文件</ul>');
	        	}
	        }      
	});
}
</script>